package com.tanhua.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.tanhua.domain.Log;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface LogMapper extends BaseMapper<Log> {

    @Select("select COUNT(DISTINCT user_id) from tb_log where log_time=#{today} and user_id in " +
            "(select user_id from tb_log tl where tl.type='0102' and tl.log_time=#{yesterday})")
    int queryRetentionCount(@Param("today") String today, @Param("yesterday") String yesterday);
}
